03. Additional Workspace Tips
Additional Workspace Tips
Below, please find a few additional workspace tips around how to use the vehicle and non-vehicle datasets within the workspace, as well as testing out your final pipeline on subclips of the full project video.
Using data
The vehicle and non-vehicle datasets sit within the /data/ folder, which is in a directory above the /home/workspace/ folder you work on your project within. In order to gather this data, you can use a command such as the following:
import glob
vehicle_images_location = glob.glob('/data/vehicles/*/*.png')
non_vehicle_images_location = glob.glob('/data/non-vehicles/*/*.png')
Stuck in a .mp4 video file
If you've clicked into a .mp4 video file to view it, click the back arrow in your browser in order to go back to the main workspace.
Output video processing speed
Please note that depending on the implementation, especially how many different scales of sliding windows used and the area that the windows slide over, the processing of the full video may be fairly slow (1-5 frames per second, which could take around an hour for the full video). This is not directly related to the workspace, but to the code itself.
If you'd like to test a subsection of the video prior to waiting for the entire video to process, you can use:
clip = VideoFileClip(input_video_location).subclip(0,5)
Where in the above, .subclip(0,5) only processes the first five seconds (you can change the values within to check different portions of the video).
Deep Learning approach
If you'd like to use a deep learning-based approach, please note that this workspace does not support GPU usage at this time. Please use either your own local GPU or a cloud compute service like AWS.